package model;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Singleton {
	private static int idbat = 0;
	private static int idtype = 0;


	static synchronized public int getIdBat(){
		return idbat++;
	}

	
	static synchronized public int getIdType(){
		return idtype++;
	}

	
	public static void toFile(String toWrite, String path){
		File file = new File(path);
		FileWriter out;
		try {
			out = new FileWriter(file);
			out.write(toWrite);
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	
	
}
